package com.smart.web.controller;


import com.smart.common.vo.ResponseResult;
import com.smart.web.service.HomeService;
import com.smart.web.vo.HomeVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zhangwei
 */
@RestController
@RequestMapping("/home")
public class HomeController {
    @Resource
    HomeService homeService;

    @GetMapping("/head")
    public ResponseResult<HomeVo> head() {
        HomeVo home = homeService.getHeadData();
        return ResponseResult.success(home);
    }

    @GetMapping("/")
    public ResponseResult<HomeVo> getContent() {
        return ResponseResult.success(null);
    }
}
